qDecodeDataUrl(): fix precondition violation in call to QByteArrayView::at()
authorDebian Qt/KDE Maintainers <debian-qt-kde@lists.debian.org>
Sat, 28 Feb 2026 17:55:04 +0000 (20:55 +0300)
committerDmitry Shachnev <mitya57@debian.org>
Sat, 28 Feb 2026 17:55:04 +0000 (20:55 +0300)
commitdda7aa081001f389f8901c98353ad0fb7df22bbb
tree0fe5f1792d217ef260985290ce2089b9d8538511
parent429f4b1b82d2d1ac016f51d07417113ea7e829c2
qDecodeDataUrl(): fix precondition violation in call to QByteArrayView::at()

Origin: upstream, https://download.qt.io/official_releases/qt/5.15/CVE-2025-5455-qtbase-5.15.patch
Last-Update: 2025-06-29

It is a precondition violation to call QByteArrayView::at() with
size() as argument. The code used that, though, as an implicit
end-of-string check, assuming == ' ' and == '=' would both fail for
null bytes. Besides, QByteArrays (but most certainly QByteArrayViews)
need not be null-terminated, so this could read even past size().

To fix, use higher-level API (startsWith()), consuming parsed tokens
along the way.

Gbp-Pq: Name CVE-2025-5455.diff
src/corelib/io/qdataurl.cpp